package io.adrainty.bolee.trade.models.bo;

import com.baomidou.mybatisplus.annotation.TableName;
import io.adrainty.bolee.framework.commons.basic.BaseBO;
import io.adrainty.bolee.trade.models.valobj.TradeStatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.math.BigDecimal;

/**
 * <p>TradeBO</p>
 *
 * @author AdRainty
 * @version V1.0.0
 * @description 交易
 * @since 2025/8/28 11:26:35
 */

@Data
@TableName("tab_trade")
@Schema(description = "交易")
@EqualsAndHashCode(callSuper = true)
public class TradeBO extends BaseBO {
    
    @Serial
    private static final long serialVersionUID = -755282687905183429L;

    @Schema(description = "openId标识")
    private String openId;

    @Schema(description = "业务系统订单号")
    private Long productOrderNo;

    @Schema(description = "交易系统订单号【对于三方来说：商户订单】")
    private Long tradeOrderNo;

    @Schema(description = "支付渠道【支付宝、微信】")
    private String tradeChannel;

    @Schema(description = "交易单状态 0待付款 1已支付 2已关闭）")
    private TradeStatusEnum tradeState;

    @Schema(description = "收款人姓名")
    private String payeeName;

    @Schema(description = "收款人账户ID")
    private Long payeeId;

    @Schema(description = "付款人姓名")
    private String payerName;

    @Schema(description = "付款人Id")
    private Long payerId;

    @Schema(description = "交易金额")
    private BigDecimal tradeAmount;

    @Schema(description = "退款金额【付款后】")
    private BigDecimal refund;

    @Schema(description = "是否有退款：YES，NO")
    private String isRefund;

    @Schema(description = "第三方交易返回编码【最终确认交易结果】")
    private String resultCode;

    @Schema(description = "第三方交易返回提示消息【最终确认交易信息】")
    private String resultMsg;

    @Schema(description = "第三方交易返回信息json【分析交易最终信息】")
    private String resultJson;

    @Schema(description = "统一下单返回编码")
    private String placeOrderCode;

    @Schema(description = "统一下单返回信息")
    private String placeOrderMsg;

    @Schema(description = "统一下单返回信息json【用于生产二维码、Android ios唤醒支付等】")
    private String placeOrderJson;

    @Schema(description = "商户ID【系统内部识别使用】")
    private String companyNo;

    @Schema(description = "备注【订单门店，桌台信息】")
    private String memo;
    
}
